﻿using Sidvall.WorkItemManager.UI.Entities;
using System.Threading.Tasks;

namespace Sidvall.WorkItemManager.Web.Host.Models
{
	public class WorkItemModel
	{
		#region Public Members

		public WorkItem WorkItem { get; set; }

		#region LoadAsync

		public async Task LoadAsync(long workItemId)
		{
			this.WorkItem = await Sidvall.WorkItemManager.UI.SystemContext.Current.DataPortal.WorkItemManager.GetItemByPrimaryKeyAsync(workItemId);
		}

		#endregion

		#endregion
		#region Constructors

		public WorkItemModel()
		{
		}

		#endregion
	}
}